﻿<div sid="1" style="width:250px;">

    <div class="mini-autocomplete" style="width:250px;"  popupWidth="400" textField="text" valueField="id" 
        url="http://www.miniui.com/demo/data/AjaxService.aspx?method=FilterCountrys2" value="cn" text="中国"  onvaluechanged="onValueChanged">     
        <div property="columns">
            <div header="ID" field="id" width="30"></div>
            <div header="国家" field="text"></div>
        </div>
    </div>

    <script type="text/javascript">

        
        function setValue() {
            var t = mini.get("tbl1");
            
            
            t.setValue("1");
            t.setText("张三");
        }
        function getValue() {
            var t = mini.get("tbl1");
            alert(t.getValue());
        }
        function enable() {
            var t = mini.get("tbl1");
            t.enable();
        }
        function disable() {
            var t = mini.get("tbl1");

            t.disable();
        }

        function onValueChanged(e) {
            
            var item = e.selected;
            if (item) { 
                alert(item.id + ":" + item.text);   //获取选中行更多属性
            }
        }

    </script>


</div>	